<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let a=[1,2,3];
        console.log(a);
        console.log(typeof a);
        a[0]=100;
        console.log(typeof a);
        //删除元素
        a.splice(1,2);
        console.log(typeof a);
        // 添加元素直接添加
        a[2]="add";

        function add(){
            console.log("abcd");
        }
        console.log(add);
        function add1(a,b){
            return a+b;
        }
        console.log(add1(1,2));
        console.log(add1(1,3));
        let temp=function(a,b){
            return a+b;
        }
        console.log(temp("101"));
    </script>

</body>
</html>